package com.test.demo;

import java.util.Arrays;
import java.util.Scanner;
//简单数据加密
public class ArrayDemo03 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num =scanner.nextInt();

        int ge = num %10;
        int shi = num /10 %10;
        int bai = num /100%10;
        int qian = num /1000%10;
        int wan = num /10000%10;
        int shiwan = num /100000%10;

        int [] numbers = new int[]{shiwan,wan,qian,bai,shi,ge};

        for (int i = 0; i < numbers.length; i++) {
//            每位数字加上5
            numbers[i]+=5;
//            然后除以10的余数替代该数字
            numbers[i]%=10;
        }

        int temp=0;
        for (int i = 0; i < numbers.length / 2; i++) {
            temp = numbers[i];
            numbers[i]=numbers[numbers.length-1-i];
            numbers[numbers.length-1-i]=temp;
;        }
        for (int i = 0; i < numbers.length; i++) {
            System.out.println(numbers[i]);
        }

    }
}
